<template>
  <div>
    <h1>这里面用来去测试一些功能</h1>
    <button @click="test">点我发送请求</button>
  </div>
</template>

<script>
import axios from "axios";
export default {
  name: "Test",
  methods: {
    async test() {
      /* axios({
        url: "/api/product/getBaseCategoryList",
        method: "get",
      }).then(
        (res) => {
          console.log(res, "res");
        },
        (err) => {
          console.log(err, "err");
        }
      ); */

      try {
        const res = await axios({
          url: "/api/product/getBaseCategoryList",
          method: "get",
        });
        console.log(res.data.data, "res");
      } catch (error) {}
    },
  },
};
</script>

<style lang="less" scoped>
</style>
